Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top |

Retrieving Image Data

This function is used by format-specific graphics import components to read data from the data source. It is implemented by the base graphics importer.


GraphicsImportReadData

Reads image data.

pascal ComponentResult GraphicsImportReadData (
                     GraphicsImportComponent ci,
                     void *dataPtr,
                     unsigned long dataOffset,
                     unsigned long dataSize);

ci
Specifies the component instance that identifies your connection to the graphics importer component.
dataPtr
A pointer to a memory block to receive the data.
dataOffset
The offset of the image data within the data reference. The function begins reading image data from this offset.
dataSize
The number of bytes of image data to read.

DISCUSSION

GraphicsImportReadData communicates with the appropriate data handler to retrieve image data. Typically, only developers of graphics importer components will need to use this function. This function should always be used to retrieve data from the data source, rather than reading it directly.

This function automatically honors any offset and limit set with GraphicsImportSetDataReferenceOffsetAndLimit . For instance, if the offset is set to 100 and ReadData is called to read bytes from dataOffset 5, it will return bytes starting at actual offset 105.

RESULT CODES

noErr
0 No error
paramErr
-50 Invalid parameter specified
memFullErr
-108 Not enough memory available

 


© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top |